<?php
/**
 * QQAS - share your knowledge to the world!
 *
 * @author		xiaochong0302 <xiaochong0302@gmail.com>
 * @copyright	Copyright (c) 2011, Koogua Studio.
 * @license		http://www.qqas.org/user_guide/license.html
 * @link		http://www.qqas.org
 * @since		Version 1.0
 * @filesource
 */


class FaqModel extends Model
{

    public function cacheFaqs()
    {
        $results = $faqs = array();
        $map = array('identifier' => array('neq', ''));
        $field = array('faq_id','identifier','title');
        $results = $this->field($field)->where($map)->select();
        if (!empty($results))
        {
            foreach ($results as $value)
            {
            	$faqs[$value['identifier']] = $value;
            }
        	F('cache_faqs', $faqs);
        }
    }

}


/* End of file FaqModel.class.php */
/* Location: ./App/Lib/Model/FaqModel.class.php */